/**
 * 写入install
 * @param {*} component
 * @returns
 */
export const withInstall = (component) => {
	component.install = (Vue) => {
		const { name } = component
		if (name) {
			Vue.component(`Ak${name}`, component)
			Vue.component(`ak-${name.toLowerCase()}`, component)
		}
	}

	return component
}
